<%-- 
    Document   : introTruong
    Created on : Jun 13, 2012, 2:50:49 PM
    Author     : AD_DA
--%>

<%@page import="BL.BLKhoa"%>
<%@page import="Bean.Khoa"%>
<%@page import="java.util.List"%>
<%@page import="Bean.Truong"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <%--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"--%>
        <title>Mapor - Cổng thông tin tuyển sinh</title>
        <link rel="shortcut icon" href="img/Logo.png" type="image">
        <link rel="stylesheet" type="text/css" href="../css/style.css" />
        <link rel="stylesheet" type="text/css" href="../css/site.css" />			
        <link rel="stylesheet" type="text/css" href="../css/slide.css" />
        <link rel="stylesheet" type="text/css" href="../css/menu.css" />
        <link rel="stylesheet" type="text/css" href="../css/nganh.css" />
    </head>
    <body>
        <% 
            Truong tr=null;
            String act=request.getParameter("act");
            String MaTruong=request.getParameter("MaTruong");
            MaTruong="2";
            act="khoa";
            if(request.getAttribute("TTTruong")==null){
                response.sendRedirect("TruongController.do?act="+act+"&MaTruong="+MaTruong);
            }else{
                 tr=(Truong) request.getAttribute("TTTruong");
            }
        %>
		<div id="left">			
			<div id="nav" >
				<ul id="sub-menu">
                                    <% 
                                        List<Khoa> listKhoa=null; 
                                        if(request.getAttribute("listKhoa")!=null){
                                            listKhoa=(List<Khoa>) request.getAttribute("listKhoa");                                       
                                            for(int i=0;i<listKhoa.size();i++){
                                    %>
                                    <li class="li<%=i+1%>" id="n<%=i%>" >
                                        <a href="#n<%=i%>">KHOA&nbsp;<%=listKhoa.get(i).getTenKhoa().toString().toUpperCase() %></a>
                                        <% 
                                            BLKhoa blkh=new BLKhoa();
                                            List<String> lstNganh=null;
                                            lstNganh=blkh.getDSTenNganh(listKhoa.get(i).getMaKhoa());
                                            List<String> listMaNganh=blkh.getDSMaNganh(listKhoa.get(i).getMaKhoa());
                                            if(lstNganh!=null) { %> 
                                            <ul class="sub-menu">
                                                <% 
                                                    for(int j=0;j<lstNganh.size();j++){
                                                %>
                                                <%String linkNganh="TTNganhController.do?act="+act+"&MaNganh="+listMaNganh.get(j);%>
                                                <li><a href="<%=linkNganh %>"> <p> Ngành&nbsp;<%=lstNganh.get(j) %></p></a></li>
                                                <% 
                                                     }
                                                %>
                                            </ul>
                                        <%  }                                       
                                                %>
                                    </li>
                                    <%}} %>
                                    </ul>
				
			</div>
		</div>
                <div id="right">
                    <div id="menuTruong">
                        <% String linkGioiThieu="TruongController.do?act=view"+"&MaTruong="+MaTruong; %>
                        <a href=<%=linkGioiThieu%>>Giới Thiệu</a>
                        <span>|</span>
                        <% String linkKhoa="TruongController.do?act=khoa"+"&MaTruong="+MaTruong;%>
                        <a href=<%=linkKhoa%>>Khoa</a>
                        <span>|</span>
                        <% String linkDiemChuan="TruongController.do?act=DiemChuan"+"&MaTruong="+MaTruong;%>
                        <a href=<%=linkDiemChuan %>>Điểm Chuẩn</a>
                    </div>
                <% 
                    if(act.equals("view")){
                %>
		
			<div class="section">
                            
				<div class="article-section">
					<h3>Sơ lược về&nbsp;<%if(tr!=null){%><%=tr.getTenTruong() %><%} %></h3>
					<img src="../img/1.png" alt="image1" />
                                        <p><%if(tr!=null){%><%=tr.getGioiThieu() %><%}; %></p>
                                </div>
			</div>
        
                <%}else if(act.equals("khoa")){%> 
                        <div id="da-slider" class="da-slider">
                    <%
           // if(request.getAttribute("listMaLHDT")!=null){
               
                        for(int i=0;i<listKhoa.size();i++)
                        {
                            
                            if(listKhoa.get(i).getTenKhoa()!=null){
                    %>
                            <div class="da-slide">
                                <h2>Khoa&nbsp; <%=listKhoa.get(i).getTenKhoa()%></h2>
                                <p><%=listKhoa.get(i).getGioiThieu() %></p>
                                <div class="da-img"><img src="../img/1.png" alt="image01" /></div>
                                <a href="#" class="da-link">ĐỌC TIẾP</a>
                            </div>
					
                    <%
                        }
                        }
                        %>                           
                                    
					<nav class="da-arrows">
						<span class="da-arrows-prev"></span>
						<span class="da-arrows-next"></span>
					</nav>
				</div>
                        <% 
                            for(int i=0; i<listKhoa.size();i++){
                        %>
                        <div class="section">
                            <h2><%=listKhoa.get(i).getTenKhoa() %></h2>
                            <div class="sub-section">    
                                <br>
                                <img src="../img/1.png" alt="image1" />                                
                                <p><%=listKhoa.get(i).getGioiThieu() %></p>
                                <a href="#">ĐỌC TIẾP</a>
                            </div>
                                <div class="submulti-section">
                                    <%
                                        BLKhoa blkh=new BLKhoa();
                                        List<String> lstNganh=null;
                                        lstNganh=blkh.getDSTenNganh(listKhoa.get(i).getMaKhoa());
                                        List<String> lstMaNganh=null;
                                        lstMaNganh=blkh.getDSMaNganh(listKhoa.get(i).getMaKhoa());
                                        if(lstMaNganh!=null){
                                            for(int j=0;j<lstMaNganh.size();j++){
                                                String linkNganh="TTNganhController.do?act=view&MaNganh="+lstMaNganh.get(j);
                                    %>
                                    <a class="article line" href=<%=linkNganh %>>
                                        <img src="../img/1.png" alt="image02" />
                                        <h4>Ngành&nbsp;<%=lstNganh.get(j) %></h4>
                                    </a>
                                    <%}}%>
                                </div>
                        </div>
                                <%}%>
			
                         
                        
                        <%}else if(act.equals("DiemChuan")){%>
                        <div class="section">
                            
			</div>
                        <%}%>
            </div>
            <br>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/modernizr.custom.28468.js"></script>		
	<script type="text/javascript" src="../js/jquery.cslider.js"></script>	
	
	<script type="text/javascript">
        $(function() {

                $('#da-slider').cslider({
                        autoplay	: true,
                        bgincrement	: 450
                });

        });
	</script>
    </body>
</html>
